]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Drop shell_global_sync_pointer()
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 18 Dec 2020 14:30:04 +0000 (15:30 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 14 Feb 2021 13:57:56 +0000 (13:57 +0000)
This is now unused, and shouldn't be used anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1556>

src/shell-global.c
src/shell-global.h

index d115a6c33365cb5fd811934d23b942eb3f1c504d..027c9d6c45b649aee8cc0936772ad9ec9647f52f 100644 (file)
@@ -1374,47 +1374,6 @@ shell_global_get_pointer (ShellGlobal         *global,
   *mods = raw_mods & CLUTTER_MODIFIER_MASK;
 }
 
-/**
- * shell_global_sync_pointer:
- * @global: the #ShellGlobal
- *
- * Ensures that clutter is aware of the current pointer position,
- * causing enter and leave events to be emitted if the pointer moved
- * behind our back (ie, during a pointer grab).
- */
-void
-shell_global_sync_pointer (ShellGlobal *global)
-{
-  int x, y;
-  ClutterModifierType mods;
-  ClutterEvent *event;
-  ClutterSeat *seat;
-
-  shell_global_get_pointer (global, &x, &y, &mods);
-
-  seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
-  event = clutter_event_new (CLUTTER_MOTION);
-
-  event->motion.time = shell_global_get_current_time (global);
-  event->motion.flags = CLUTTER_EVENT_FLAG_SYNTHETIC;
-  event->motion.stage = global->stage;
-  event->motion.x = x;
-  event->motion.y = y;
-  event->motion.modifier_state = mods;
-  event->motion.axes = NULL;
-  clutter_event_set_device (event, clutter_seat_get_pointer (seat));
-
-  /* Leaving event.source NULL will force clutter to look it up, which
-   * will generate enter/leave events as a side effect, if they are
-   * needed. We need a better way to do this though... see
-   * http://bugzilla.clutter-project.org/show_bug.cgi?id=2615.
-   */
-  clutter_event_set_source_device (event, NULL);
-
-  clutter_event_put (event);
-  clutter_event_free (event);
-}
-
 /**
  * shell_global_get_switcheroo_control:
  * @global: A #ShellGlobal
index e1fa60aefbb415e7dcd7b9dd6bc6467b54c9cce1..60bda71313bf3b9fea0dd95e9a31e778cd611dca 100644 (file)
@@ -64,8 +64,6 @@ void shell_global_run_at_leisure (ShellGlobal          *global,
 
 
 /* Misc utilities / Shell API */
-void     shell_global_sync_pointer              (ShellGlobal  *global);
-
 GDBusProxy *
          shell_global_get_switcheroo_control    (ShellGlobal  *global);